package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.GoodsPackageMapper;
import com.ruoyi.domain.GoodsPackage;
import com.ruoyi.service.IGoodsPackageService;

/**
 * 销售促销套餐Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-13
 */
@Service
public class GoodsPackageServiceImpl implements IGoodsPackageService 
{
    @Autowired
    private GoodsPackageMapper goodsPackageMapper;

    /**
     * 查询销售促销套餐
     * 
     * @param packageId 销售促销套餐主键
     * @return 销售促销套餐
     */
    @Override
    public GoodsPackage selectGoodsPackageByPackageId(Long packageId)
    {
        return goodsPackageMapper.selectGoodsPackageByPackageId(packageId);
    }

    /**
     * 查询销售促销套餐列表
     * 
     * @param goodsPackage 销售促销套餐
     * @return 销售促销套餐
     */
    @Override
    public List<GoodsPackage> selectGoodsPackageList(GoodsPackage goodsPackage)
    {
        return goodsPackageMapper.selectGoodsPackageList(goodsPackage);
    }

    /**
     * 新增销售促销套餐
     * 
     * @param goodsPackage 销售促销套餐
     * @return 结果
     */
    @Override
    public int insertGoodsPackage(GoodsPackage goodsPackage)
    {
        return goodsPackageMapper.insertGoodsPackage(goodsPackage);
    }

    /**
     * 修改销售促销套餐
     * 
     * @param goodsPackage 销售促销套餐
     * @return 结果
     */
    @Override
    public int updateGoodsPackage(GoodsPackage goodsPackage)
    {
        return goodsPackageMapper.updateGoodsPackage(goodsPackage);
    }

    /**
     * 批量删除销售促销套餐
     * 
     * @param packageIds 需要删除的销售促销套餐主键
     * @return 结果
     */
    @Override
    public int deleteGoodsPackageByPackageIds(Long[] packageIds)
    {
        return goodsPackageMapper.deleteGoodsPackageByPackageIds(packageIds);
    }

    /**
     * 删除销售促销套餐信息
     * 
     * @param packageId 销售促销套餐主键
     * @return 结果
     */
    @Override
    public int deleteGoodsPackageByPackageId(Long packageId)
    {
        return goodsPackageMapper.deleteGoodsPackageByPackageId(packageId);
    }

    @Override
    public List<GoodsPackage> selectGoodsPackage() {
        return goodsPackageMapper.selectGoodsPackage();
    }
}
